import { ECSCmp } from "../../lib/kgame/ecs/ECSCmp";
import { BaseAI } from "./ai/BaseAI";
/**
 * AI组件
 */
export class CmpAI extends ECSCmp {

    ai: BaseAI

    /**
     * 初始化AI组件
     * @param ai 行为树根节点
     * @returns 
     */
    onCreate(ai: BaseAI) {
        this.ai = ai;
        return this;
    }

    onClear(): void {
        this.ai = null;
    }
}